using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using ChuanPlus.DAO;
namespace ChuanPlus.FormControl
{
    public partial class FormViewStockcardDetails : DevExpress.XtraEditors.XtraForm
    {
        Warehouse m_warehouse;
        Product m_product;
        DateTime FromDate;
        DateTime ToDate;        
        /// <summary>
        /// Initializes a new instance of the FormViewStockcardDetails class.
        /// </summary>
        /// <param name="m_warehouse"></param>
        /// <param name="m_product"></param>
        /// <param name="fromDate"></param>
        /// <param name="toDate"></param>
        public FormViewStockcardDetails(Warehouse m_warehouse, Product m_product, DateTime fromDate, DateTime toDate)
        {
            this.m_warehouse = m_warehouse;
            this.m_product = m_product;
            FromDate = fromDate;
            ToDate = toDate;
            InitializeComponent();
            grid.DataSource = StockCardDAO.GetStockCard(m_product, fromDate, toDate, m_warehouse);
            lblProduct.Text = m_product.ItemCode + " / " + m_product.Description;
            lblFromDate.Text = FromDate.Date.ToString("MM/dd/yyyy");
            lblToDate.Text = ToDate.Date.ToString("MM/dd/yyyy");
            lblWarehouse.Text = m_warehouse.warehouseName;
        }

        private void labelControl4_Click(object sender, EventArgs e)
        {
            
        }
    }
}